﻿Imports System.Data.SqlClient

Public Class DJuridicas



    Inherits Conexion
    Dim cmd As New SqlCommand


    Public Function guardarperjuridicas(ByVal dts As Entidades.EJuridicas) As Boolean
        Try
            conectado()
            cmd = New SqlCommand("sp_gurdarjuridicas")
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Connection = cnn
            cmd.Parameters.AddWithValue("@apellido", dts.apenom)
            cmd.Parameters.AddWithValue("@tipo", dts.tipodni)
            cmd.Parameters.AddWithValue("@numdocumento", dts.numdni)
            cmd.Parameters.AddWithValue("@domlegal", dts.domlegal)
            cmd.Parameters.AddWithValue("@numlegal", dts.numlegal)
            cmd.Parameters.AddWithValue("@pisolegal", dts.pisolegal)
            cmd.Parameters.AddWithValue("@dptolegal", dts.dptolegal)
            cmd.Parameters.AddWithValue("@domreal", dts.domreal)
            cmd.Parameters.AddWithValue("@numreal", dts.numreal)
            cmd.Parameters.AddWithValue("@pisoreal", dts.pisoreal)
            cmd.Parameters.AddWithValue("@dptoreal", dts.dptoreal)
            cmd.Parameters.AddWithValue("@telfijo", dts.telfijo)
            cmd.Parameters.AddWithValue("@telmovil", dts.telmovil)
            cmd.Parameters.AddWithValue("@cuit", dts.numcuit)
            cmd.Parameters.AddWithValue("@tramite", dts.tramite_personas)


            If cmd.ExecuteNonQuery Then
                Return True
            Else
                Return False
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
            Return False
        Finally
            desconectado()
        End Try
    End Function
End Class

